package com.zhuang.adapter.classadapter;

/**
 * @Classname Phone
 * @Description 手机类
 * @Date 2021/3/21 14:15
 * @Created by dell
 */

public class Phone {
    public void charging(Voltage5V voltage5V) {
        if (voltage5V.output5V() == 5) {
            System.out.println("电压5伏，可以充电");
        } else if (voltage5V.output5V() > 5) {
            System.out.println("电压过大，不可以充电");
        }
    }
}
